package com.leoman.service;

import com.leoman.entity.Broadcast;
import com.leoman.exception.ParamErrorException;
import com.leoman.service.common.ICommonService;
import org.springframework.data.domain.Page;
import org.springframework.web.multipart.MultipartRequest;

/**
 * BroadcastService
 * Created by 涂奕恒 on 2016/11/23 0023 下午 3:51.
 */
public interface BroadcastService extends ICommonService<Broadcast> {

    // 广播列表（分页）
    Page<Broadcast> iPageForApp(Integer userId, Integer isMe, Integer pageNum, Integer pageSize);

    // 我的收藏广播列表（分页）
    Page<Broadcast> iPageForAppCollect(Integer userId, Integer pageNum, Integer pageSize);

    // 添加广播
    void addBroadcastInfo(Boolean isAdmin, Integer userId, String title, Integer duration, MultipartRequest multipartRequest) throws ParamErrorException;

    // 广播列表（分页）
    Page<Broadcast> pageByParams(String userName, String startTime, String endTime, Integer isAdmin, Integer pageNum, Integer pageSize);

    // 置顶
    Integer toTop(Integer paperId);

    // 批量删除广播
    Integer batchDelete(String ids);

    // 后台添加广播
    Integer saveBroadcast(String title, MultipartRequest multipartRequest);
}